import request from "../utils/request";

export const queryAllDept = () => {
    return request.get('/depts')
}

//json格式传递参数
export const addDept = (data) => {
    return request.put('/depts', data)
}

//url拼接参数
export const deleteDept = (id) => {
    return request.delete(`/depts/${id}`)
}
// 编辑部门，传json对象（包含id和name），用POST
export const updateDept = (data) => {
    return request.post('/depts', data)
}